//demo中的数据是模拟状态数据，用于测试，实际使用中，请根据您自己的业务编写
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
    state: {

        curcity: '全国',
        AdddressInfor: {},
        city: "全国",
        citiesInfor: [],
        searchPage: 0,
        siteRecruitmentPage: 0,
        findWorkersPage: 0,
        curSite:''
    },
    mutations: {

        setcurSite(state, arr) {
            console.log(state,88888888899999);
            state.curSite = arr;
        },

        setAdddressInfor(state, arr) {
            state.AdddressInfor = arr;
        },
        setCity(state, arr) {
            state.city = arr;
        },
        setcurcity(state, arr) {
            state.curcity = arr;
        },
        setCitiesInfor(state, arr) {
            state.citiesInfor = arr;
        },
        setSearchPage(state, arr) {
            state.searchPage = arr;
        },
        setsiteRecruitmentPage(state, arr) {
            state.siteRecruitmentPage = arr;
        },
        setfindWorkersPage(state, arr) {
            state.findWorkersPage = arr;
        }
    },
    actions: {

    },
    getters: {
        AdddressInfor(state, getters) {
            return state.AdddressInfor
        },
        city(state, getters) {
            return state.city
        },

        curcity(state, getters) {
            return state.curcity
        },
        citiesInfor(state, getters) {
            return state.citiesInfor
        },
        searchPage(state, getters) {
            return state.searchPage
        },
        siteRecruitmentPage(state, getters) {
            return state.siteRecruitmentPage
        },
        findWorkersPage(state, getters) {
            return state.findWorkersPage
        },
    }
})
export default store